<%= content_tag_for :li, page do %>
  <%= page_icon page %>
  <% if page.published? %>
    <%= cms_icon 'accept.png' %>
  <% else %>
    <%= link_to cms_icon('delete.png', :title => 'Delete'), cms_page_path(page), :method => :delete, :confirm => "Are you sure you want to delete the \"#{page}\" page?" %>
  <% end %>
  <%= link_to truncate(page.to_s, :length => 24), edit_cms_page_path(page), :title => "Edit '#{page}'" %>

  <%= cms_icon 'house.png', :title => 'Root/Home Page' if page.root? %>
  <%= link_to cms_icon('magnifier.png', :title => 'View'), page.url, :class => 'external' if page.published? %>

  <% unless page.content_pages.empty? %>
    <ul>
      <%= render :partial => 'cms/pages/page', :collection => page.content_pages %>
    </ul>
  <% end %>
<% end %>
